package com.iplay.dao.recommendation;

import java.util.List;

import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;
import org.springframework.transaction.annotation.Transactional;

import com.iplay.entity.recommendation.RecommendationDO;

public interface RecommendationDAO extends CrudRepository<RecommendationDO,Integer>{
	
	@Transactional
	void deleteByHotelId(int hotelId);

	@Transactional
	@Modifying
	@Query("delete from RecommendationDO  r where r.hotelId in ?1")
	void deleteByHotels(List<Integer> hotels);
}
